﻿<UserControl x:Class="SQLServerCompanion.Views.StoredProcsView"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
            xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
            xmlns:CinchV2="clr-namespace:Cinch;assembly=Cinch.WPF"
            xmlns:meffed="http:\\www.codeplex.com\MEFedMVVM" 
            
            xmlns:ctl="clr-namespace:SQLServerCompanion.Controls"     
            meffed:ViewModelLocator.ViewModel="StoredProcsViewModel"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="0" >
            <Button Command="{Binding DoCopyToClipboardCommand}" Margin="5" Style="{DynamicResource NormalButtonStyle}" Width="150">Copy to clip board</Button>
            <Button Command="{Binding DoSaveAsCommand}" Margin="5" Style="{DynamicResource NormalButtonStyle}" Width="150">Save to file</Button>
        </StackPanel>

        <Canvas Style="{StaticResource LoadingStyle}" Panel.ZIndex="100" Grid.Row="0">
            <ctl:WorkingImage ImageSize="50" ImageVisibility="Visible"/>
        </Canvas>
        
        <TextBox  x:Name="rtfSQLScript" Grid.Row="1" Text="{Binding Path=SQLScript}" 
                  Width="Auto" Margin="5" 
                  VerticalScrollBarVisibility="Auto"/>
        
    </Grid>
</UserControl>
